Intra prediction mode encoding/decoding method and apparatus for same

ABSTRACT

Disclosed herein is an intra prediction method including: deriving neighbor prediction mode information from a left neighbor prediction mode and an upper neighbor prediction mode; deriving an intra prediction mode for a decoding target unit by using the derived neighbor prediction mode information; and performing intra prediction on the decoding target unit based on the intra prediction mode. According to exemplary embodiments of the present invention, image encoding/decoding efficiency can be improved.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/664,731 filed on Oct. 25, 2019, which is a continuation of U.S.patent application Ser. No. 16/117,948 filed on Aug. 30, 2018, now U.S.Pat. No. 10,511,836, issued Dec. 17, 2019, which is a continuation ofU.S. patent application Ser. No. 15/799,086 filed on Oct. 31, 2017, nowU.S. Pat. No. 10,091,502, issued Oct. 2, 2018, which is a continuationof U.S. patent application Ser. No. 15/477,714, filed Apr. 3, 2017, nowU.S. Pat. No. 9,838,689, issued Dec. 5, 2017, which is a continuation ofU.S. patent application Ser. No. 15/055,150, filed on Feb. 26, 2016, nowU.S. Pat. No. 9,648,327, issued May 9, 2017, which is a continuation ofU.S. patent application Ser. No. 13/988,958 filed May 22, 2013, now U.S.Pat. No. 9,350,993, issued May 24, 2016, which is a National Stage ofInternational Application No. PCT/KR2011/009957, filed Dec. 21, 2011 andpublished as WO 2012/087035 on Jun. 28, 2012, which claims benefit under35 U.S.C. § 119(a) of Korean Patent Application No. 10-2010-0131086filed Dec. 21, 2010, Korean Patent Application No. 10-2011-0016610 filedFeb. 24, 2011, Korean Patent Application No. 10-2011-0046785 filed May18, 2011, and Korean Patent Application No. 10-2011-0139469 filed Dec.21, 2011 in the Korean Intellectual Property Office, the contents of allof which are incorporated herein by reference in their entireties. Theapplicant(s) hereby rescind any disclaimer of claim scope in the parentapplication(s) or the prosecution history thereof and advise the USPTOthat the claims in this application may be broader than any claim in theparent application(s).

TECHNICAL FIELD

The present invention relates to image processing, and moreparticularly, to a method and an apparatus for encoding/decoding anintra prediction mode.

BACKGROUND

Recently, with the expansion of broadcasting services having highdefinition (HD) resolution in the country and around the world, manyusers have been accustomed to a high resolution and definition image,such that many organizations have conducted many attempts to developnext-generation image devices. In addition, the interest in HDTV andultra high definition (UHD) having a resolution four times higher thanthat of HDTV have increased and thus, a compression technology forhigher-resolution and higher-definition image have been required.

For the image compression, an inter prediction technology predictingpixel values included in a current picture from a picture before and/orafter the current picture, an intra prediction technology predictingpixel values included in a current picture using pixel information inthe current picture, an entropy encoding technology allocating a shortcode to symbols having a high appearance frequency and a long code tosymbols having a low appearance frequency, or the like, may be used.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration of an image encodingapparatus according to an exemplary embodiment of the present invention.

FIG. 2 is a block diagram showing a configuration of an image decodingapparatus to according to an exemplary embodiment of the presentinvention.

FIG. 3 is a conceptual diagram schematically showing an exemplaryembodiment of a reconstructed neighbor unit for an encoding/decodingtarget unit.

FIG. 4 is a flow chart schematically showing a method for encoding anintra prediction mode according to an exemplary embodiment of thepresent invention.

FIG. 5 is a flow chart showing an exemplary embodiment of a method forperforming entropy encoding using neighbor prediction mode information.

FIG. 6 is a table showing an exemplary embodiment of a method forselecting a context model according to angular difference information.

FIG. 7 is a table showing an exemplary embodiment of a method forselecting a VLC table according to the angular difference information.

FIG. 8 is a table showing an example of codewords allocated to each ofthe plurality of VLC tables.

FIG. 9 is a table showing an exemplary embodiment of a method forselecting a context model according to a mode number of neighborprediction modes.

FIG. 10 is a table showing an exemplary embodiment of a method forselecting a VLC table according to the mode number of the neighborprediction modes.

FIG. 11 is a table showing an exemplary embodiment of a method forselecting a context model using the angular difference informationbetween the neighbor prediction modes and the mode number information onthe neighbor prediction modes.

FIG. 12 is a table showing an exemplary embodiment of a method forselecting a VLC table using the angular difference information betweenthe neighbor prediction modes and the mode number information on theneighbor prediction modes.

FIG. 13 is a flow chart schematically showing a method for decoding anintra prediction mode according to an exemplary embodiment of thepresent invention.

FIG. 14 is a flow chart showing an exemplary embodiment of a method forperforming entropy decoding using the neighbor prediction modeinformation.

BRIEF SUMMARY OF INVENTION Technical Problem

The present invention provides an image encoding method and apparatuscapable of improving image encoding/decoding efficiency.

The present invention also provides an image decoding method andapparatus capable of improving image encoding/decoding efficiency.

The present invention also provides an intra prediction method andapparatus capable of improving image encoding/decoding efficiency.

The present invention also provides a method and an apparatus forencoding an intra prediction mode capable of improving imageencoding/decoding efficiency.

The present invention also provides a method and an apparatus fordecoding an intra prediction mode capable of improving imageencoding/decoding efficiency.

Technical Solution

In an aspect, there is provided an intra prediction method, including:deriving neighbor prediction mode information from a left neighborprediction mode and an upper neighbor prediction mode; deriving an intraprediction mode for a decoding target unit by using the derived neighborprediction mode information; and performing intra prediction on thedecoding target unit based on the derived intra prediction mode, whereinthe left neighbor prediction mode is an intra prediction mode of a leftneighbor unit adjacent to the left of the decoding target unit and theupper neighbor prediction mode is an intra prediction mode of the upperneighbor unit adjacent to the upper of the decoding target unit, and theneighbor prediction mode information includes at least one of angulardifference information and mode number information, the angulardifference information includes an angular difference value between anangle of the left neighbor prediction mode and an angle of the upperneighbor prediction mode, and the mode number information includes amode number of the left neighbor prediction mode and a mode number ofthe upper neighbor prediction mode.

The deriving of the intra prediction mode may further include: receivingand decoding an MPM index for the decoding target unit; determining mostprobable mode (MPM) candidates for the decoding target unit by using theneighbor prediction mode information; generating an MPM list by usingthe determined MPM candidates; and deriving the intra prediction mode ofthe decoding target unit by using the decoded MPM index and thegenerated MPM list, wherein the MPM index is an index indicating thesame candidate as the intra prediction mode of the decoding target unit,among the MPM candidates included in the MPM list.

The determining of the MPM candidates may further include: determiningthe left neighbor prediction mode and the upper neighbor prediction modeas the MPM candidates, wherein the number of MPM candidates included inthe MPM list is a predetermined fixed number.

The determining of the MPM candidates may further include determiningthe predetermined intra prediction mode as additional MPM candidates,when the left neighbor prediction mode is the same as the upper neighborprediction mode.

The predetermined intra prediction mode may be a planar mode.

The predetermined intra prediction mode may be a DC mode when the leftneighbor prediction mode and the upper neighbor prediction mode are aplanar mode.

The determining of the MPM candidates may further include determiningthe predetermined intra prediction mode as the additional MPM candidateswhen the left neighbor unit or the upper neighbor unit is not available.

The predetermined intra prediction mode may be a planar mode.

The deriving of the intra prediction mode may include: selecting acontext model for the decoding target unit among the plurality ofcontext models by using the neighbor prediction mode information; andperforming entropy decoding on the intra prediction mode information ofthe decoding target unit by using the selected context model, whereinthe intra prediction mode information includes at least one of an MPMflag, an MPM index, and a remaining mode.

The selecting of the context model may select a context modelcorresponding to the angular difference information as the context modelfor the decoding target unit.

The selecting of the context model may select the context modelcorresponding to the mode number information as the context model forthe decoding target unit.

The selecting of the context model may select the context modelcorresponding to the angular difference information and the mode numberinformation as the context model for the decoding target unit.

The deriving of the intra prediction mode may further include: selectinga VLC table for the decoding target unit among a plurality of variablelength coding (VLC) table by using the neighbor prediction modeinformation; and performing entropy decoding on the intra predictionmode information of the decoding target unit by using the selected VLCtable, wherein the intra prediction mode includes at least one of an MPMflag, an MPM index, and a remaining mode.

The selecting of the VLC table may select the VLC table corresponding tothe angular difference information as the VLC table for the decodingtarget unit.

The selecting of the VLC table may select the VLC table corresponding tothe mode number information as the VLC table for the decoding targetunit.

The selecting of the VLC table may select the VLC table corresponding tothe angular difference information and the mode number information asthe VLC table for the decoding target unit.

In another aspect, there is provided a method for decoding an intraprediction mode, including: deriving neighbor prediction modeinformation from a left neighbor prediction mode and an upper neighborprediction mode; and deriving an intra prediction mode for a decodingtarget unit by using the derived neighbor mode information, wherein theleft neighbor prediction mode is an intra prediction mode of a leftneighbor unit adjacent to the left of the decoding target unit and theupper prediction mode is an intra prediction mode of an upper neighborunit adjacent to the upper of the decoding target unit, and the neighborprediction mode information includes at least one of angular differenceinformation and mode number information, the angular differenceinformation includes an angular difference value between an angle of theleft neighbor prediction mode and an angle of the upper neighborprediction mode, and the mode number information includes a mode numberof the left neighbor prediction mode and a mode number of the upperneighbor prediction mode.

The deriving of the intra prediction mode may further include: receivingand decoding an MPM index for the decoding target unit; determining mostprobable mode (MPM) candidates for the decoding target unit by using theneighbor prediction mode information; generating an MPM list by usingthe determined MPM candidates; and deriving the intra prediction mode ofthe decoding target unit by using the decoded MPM index and thegenerated MPM list, wherein the MPM index is an index indicating thesame candidate as the intra prediction mode of the decoding target unit,among the MPM candidates included in the MPM list.

The deriving of the intra prediction mode may include: selecting acontext model for the decoding target unit among the plurality ofcontext models by using the neighbor prediction mode information; andperforming entropy decoding on the intra prediction mode information ofthe decoding target unit by using the selected context model, whereinthe intra prediction mode information includes at least one of an MPMflag, an MPM index, and a remaining mode.

The deriving of the intra prediction mode may further include: selectinga VLC table for the decoding target unit among a plurality of variablelength coding (VLC) table by using the neighbor prediction modeinformation; and performing entropy decoding on the intra predictionmode information of the decoding target unit by using the selected VLCtable, wherein the intra prediction mode includes at least one of an MPMflag, an MPM index, and a remaining mode.

Advantageous Effects

The image encoding method according to the exemplary embodiments of thepresent invention can improve the image encoding/decoding efficiency.

Further, the image decoding method according to the exemplaryembodiments of the present invention can improve the imageencoding/decoding efficiency.

The intra prediction method according to the exemplary embodiments ofthe present invention can improve the image encoding/decodingefficiency.

The method for encoding an intra prediction mode according to theexemplary embodiments of the present invention can improve the imageencoding/decoding efficiency.

The method for decoding an intra prediction mode according to theexemplary embodiments of the present invention can improve the imageencoding/decoding efficiency.

DETAILED DESCRIPTION Mode for Invention

Hereinafter, exemplary embodiments of the present invention will bedescribed in detail with reference to the accompanying drawings. Indescribing exemplary embodiments of the present invention, well-knownfunctions or constructions will not be described in detail since theymay unnecessarily obscure the understanding of the present invention.

It will be understood that when an element is simply referred to asbeing ‘connected to’ or ‘coupled to’ another element without being‘directly connected to’ or ‘directly coupled to’ another element in thepresent description, it may be ‘directly connected to’ or ‘directlycoupled to’ another element or be connected to or coupled to anotherelement, having the other element intervening therebetween. Further, inthe present invention, “comprising” a specific configuration will beunderstood that additional configuration may also be included in theembodiments or the scope of the technical idea of the present invention.

Terms used in the specification, ‘first’, ‘second’, etc. can be used todescribe various components, but the components are not to be construedas being limited to the terms. The terms are only used to differentiateone component from other components. For example, the ‘first’ componentmay be named the ‘second’ component without being departed from thescope of the present invention and the ‘second’ component may also besimilarly named the ‘first’ component.

Furthermore, constitutional parts shown in the embodiments of thepresent invention are independently shown so as to representcharacteristic functions different from each other. Thus, it does notmean that each constitutional part is constituted in a constitutionalunit of separated hardware or software. In other words, eachconstitutional part includes each of enumerated constitutional parts forconvenience. Thus, at least two constitutional parts of eachconstitutional part may be combined to form one constitutional part orone constitutional part may be divided into a plurality ofconstitutional parts to perform each function. The embodiment where eachconstitutional part is combined and the embodiment where oneconstitutional part is divided are also included in the scope of thepresent invention, if not departing from the essence of the presentinvention.

In addition, some of constituents may not be indispensable constituentsperforming essential functions of the present invention but be selectiveconstituents improving only performance thereof. The present inventionmay be implemented by including only the indispensable constitutionalparts for implementing the essence of the present invention except theconstituents used in improving performance. The structure including onlythe indispensable constituents except the selective constituents used inimproving only performance is also included in the scope of the presentinvention.

FIG. 1 is a block diagram showing a configuration of an image encodingapparatus according to an exemplary embodiment of the present invention.

Referring to FIG. 1, an image encoding apparatus 100 includes a motionestimator 111, a motion compensator 112, an intra predictor 120, aswitch 115, a subtractor 125, a transformer 130, a quantizer 140, anentropy encoder 150, a dequantizer 160, an inverse transformer 170, anadder 175, a filter unit 180, and a reference picture buffer 190.

The image encoding apparatus 100 may perform encoding on input imageswith an intra mode or an inter mode to output bit streams. The intraprediction means intra-picture prediction and the inter prediction meansinter-picture prediction. In the case of the intra mode, the switch 115may be switched to intra and in the case of the inter mode, the switch115 may be switched to inter. The image encoding apparatus 100 maygenerate a predicted block for an input block of the input images andthen, encode residuals between the input block and the predicted block.

In the case of the intra mode, the intra predictor 120 may performspatial prediction using the pixel values of the previously encodedblocks around the current block to generate the predicted block.

In the case of the inter mode, the motion estimator 111 may obtain amotion vector by searching a region optimally matched with the inputblock in a reference picture stored in the reference picture buffer 190during a motion prediction process. The motion compensator 112 mayperform the motion compensation by using the motion vector to generatethe predicted block.

The subtractor 125 may generate a residual block due to the residuals ofthe input block and the generated predicted block. The transformer 130may output transform coefficients by performing a transform on theresidual block. Further, the quantizer 140 may quantize the inputtransform coefficient according to quantization parameters to outputquantized coefficients.

The entropy encoder 150 may perform entropy encoding on the symbolsaccording to the probability distribution based on values calculated inthe quantizer 140 or coding parameter values calculated during theencoding process, or the like, calculated during the encoding process tooutput bit streams. The entropy encoding method is a method thatreceives the symbols having various values and represents the inputsymbols by decodable bin sequence/string while removing statisticalredundancy.

In this case, the symbol means an encoding/decoding target syntaxelement, a coding parameter, a value of a residual signal, or the like.The coding parameter, which is a parameter necessary for encoding anddecoding, may include information that is encoded in the encoder likethe syntax element and transferred to a decoder and information that maybe derived during the encoding or decoding process and means thenecessary information at the time of encoding and decoding the images.The coding parameter may include, for example, values or statistics,such as the intra/inter prediction mode, the movement/motion vector, thereference picture index, the encoding block pattern, the presence andabsence of the residual signal, the quantization parameters, the unitsize, the unit partition information, or the like.

When the entropy encoding is applied, the entropy encoding may representsymbols by allocating a small number of bits to the symbols having highoccurrence probability and allocating a large number of bits to thesymbols having low occurrence probability to reduce a size of the bitstreams for the encoding target symbols. Therefore, the compressionperformance of the image encoding may be increased through the entropyencoding.

For the entropy encoding, an encoding method such as exponential golomb,context-adaptive variable length coding (CAVLC), context-adaptive binaryarithmetic coding (CABAC), or the like, may be used. For example, theentropy encoder 150 may be stored with a table for performing theentropy encoding such as variable length coding/code (VLC) table and theentropy encoder 150 may perform the entropy encoding using the storedvariable length coding/code (VLC) table In addition, the entropy encoder150 may also perform the entropy encoding by deriving the binarizationmethod of the target symbols and the target symbol/bin probability modeland then using the derived binarization method or the probability model.

In this case, the binarization means that the values of the symbols arerepresented by a bin sequence/string. In this case, the bin means eachbin value (0 or 1) when the symbols are represented by the binsequence/string through the binarization. The probability model meansthe predicted probability of the encoding/decoding target symbols/binsthat may be derived through a context model. The context model is theprobability mode for the bin of one or more binarized symbols and may beselected by the statistics of the recently encoded data symbols.

In more detail, the CABAC entropy encoding method binarizes the symbolsthat are not binarized and transform the binarized symbols into thebins, determines the context model by using the encoding information onthe neighbor and encoding target blocks or the information on thesymbols/bins encoded at a previous step, and generates the bit stream byperforming arithmetic encoding of the bin by predicting the occurrenceprobability of the bin according to the determined context model. Inthis case, the CABAC entropy encoding method may determine the contextmodel and then, update the context model by using the information on thesymbols/bins encoded for the context model of the symbols/bins.

The image encoding apparatus according to the exemplary embodiment ofFIG. 1 performs the inter prediction encoding, that is, theinter-picture prediction encoding and thus, the current encoded imageneeds to be decoded and stored so as to be used as the referencepicture. Therefore, the quantized coefficient may be dequantized in thedequantizer 160 and inversely transformed in the inverse transformer180. The dequantized, inverse transformed coefficients are added to thepredicted block through the adder 175 and a reconstructed block isgenerated.

The reconstructed block passes through the filter unit 180 and thefilter unit 180 may apply at least one of a deblocking filter, sampleadaptive offset (SAO), and an adaptive loop filter (ALF) to thereconstructed block or a reconstructed picture. The reconstructed blockpassing through the filter unit 180 may be stored in the referencepicture buffer 190.

FIG. 2 is a block diagram showing a configuration of an image decodingapparatus to according to an exemplary embodiment of the presentinvention.

Referring to FIG. 2, an image decoding apparatus 200 includes an entropydecoder 210, a dequantizer 220, an inverse transformer 230, an intrapredictor 240, a motion compensator 250, an adder 255, a filter unit260, and a reference picture buffer 270.

The image decoding apparatus 200 may receive the bit streams output fromthe encoder to perform the decoding with the intra mode or the intermode and output the reconstructed image, that is, the reconstructedimage. In the case of the intra mode, the switch may be switched to theintra and in the case of the inter mode, the switch may be switched tothe inter mode. The image decoding apparatus 200 obtains the residualblock from the received bit streams and generates the predicted blockand then, add the residual block and the predicted block, therebygenerating the reconstructed block, that is, the reconstructed block.

The entropy decoder 210 may perform the entropy encoding on the inputbit streams according to the probability distribution to generate thesymbols having the quantized coefficient type of symbols. The entropyencoding method is a method that receives the bin sequence/string andgenerates each symbol. The entropy decoding method is similar to theabove-mentioned entropy encoding method.

In more detail, the CABAC entropy decoding method may receive the bincorresponding to each syntax element in the bit streams, use thedecoding target syntax element information and the decoding informationon the neighbor and decoding target block or the information on thesymbols/bins decoded at the previous step to determine the contextmodel, and predict the occurrence probability of the bin according tothe determined context model and performs the arithmetic decoding of thebin to generate the symbols corresponding to the values of each syntaxelement. In this case, the CABAC entropy decoding method may determinethe context model and then, update the context model by using theinformation on the symbols/bins decoded for the context model of thesymbols/bins.

When the entropy decoding method is applied, the entropy decoding methodrepresents the symbols by allocating a small number of bits to thesymbols having high occurrence probability and allocating a large numberof bits to the symbols having low occurrence probability, therebyreducing the size of the bit streams for each symbol. Therefore, thecompression performance of the image decoding may be increased throughthe entropy decoding method.

The quantized coefficients are dequantized in the dequantizer 220 andare inversely transformed in the inverse transformer 230. The quantizedcoefficients may be dequantized/inversely transformed to generate theresidual block.

In the case of the intra mode, the intra predictor 240 may performspatial prediction using the pixel values of the previously encodedblocks around the current block to generate the predicted block. In thecase of the inter mode, the motion compensator 250 performs the motioncompensation by using the motion vector and the reference picture storedin the reference picture buffer 270, thereby generating the predictedblock.

The residual block and the prediction block are added through the adder255 and the added block passes through the filter unit 260. The filterunit 260 may apply at least one of the deblocking filter, the SA0, andthe ALF to the reconstructed block or the reconstructed picture. Thefilter unit 260 outputs the reconstructed images, that is, thereconstructed images. The reconstructed image may be stored in thereference picture buffer 270 so as to be used for the inter prediction.

Hereinafter, the unit means a unit of the image encoding and decoding.At the time of the image encoding and decoding, the encoding or decodingunit means the divided unit when performing the encoding and decoding bydividing the images, which may be called a block, a coding unit (CU), anencoding block, a prediction unit (PU), a prediction block, a transformunit (TU), a transform block, or the like. The single unit may besubdivided into a lower unit having a smaller size.

Here, the prediction unit means a basic unit that is a unit ofperforming the prediction and/or the motion compensation. The predictionunit may be divided into a plurality of partitions and each partitionmay also be referred to as prediction unit partition. When theprediction unit is divided into a plurality of partitions, each of theplurality of partitions may be a basic unit that is a unit of performingthe prediction and/or the motion compensation. Hereinafter, in theexemplary embodiment of the present invention, each partition in whichthe prediction unit is divided may also be referred to as the predictionunit.

Meanwhile, the intra prediction may be performed according to the intraprediction mode of the encoding/decoding target unit. In this case, eachof the intra prediction mode may have the prediction directioncorresponding thereto and each prediction direction may have apredetermined angle value. Therefore, the intra prediction mode of theencoding/decoding target unit may also represent the predictiondirection information on the encoding/decoding target unit.

The encoder may encode the intra prediction mode and transmit theencoded intra prediction mode to the decoder. When the encoder encodesand transmits the intra prediction mode for the encoding target unit, inorder to reduce the transmitted bit amount and increase the encodingefficiency, the method for predicting the intra prediction mode may beused.

The prediction mode of the encoding target unit has the high probabilityto be equal to the prediction mode of the reconstructed neighbor unitsand therefore, the prediction mode of the encoding target unit can beencoded by using the prediction mode of the reconstructed neighbor unitadjacent to the encoding target unit. Hereinafter, the prediction modesused as the prediction value for the intra prediction mode of theencoding target unit are referred to as a most probable mode (MPM). Inthis case, the reconstructed neighbor unit, which is a unit encoded ordecoded in advance and reconstructed, may include a unit adjacent to theencoding/decoding target unit, a unit disposed at a right upper cornerof the encoding/decoding target unit, a unit disposed at a left uppercorner of the encoding/decoding target unit, and/or a unit disposed at aleft lower corner of the encoding/decoding target unit.

FIG. 3 is a conceptual diagram schematically showing an exemplaryembodiment of a reconstructed neighbor unit for an encoding/decodingtarget unit.

Referring to FIG. 3, as the reconstructed neighbor unit for theencoding/decoding target unit E, there may be the left neighbor unit Aadjacent to the left of E unit, the upper neighbor unit B adjacent tothe upper of E unit, the right upper corner unit C disposed at the rightupper corner of E unit, and the left upper corner unit D disposed at theleft upper corner of E unit, or the like.

Hereinafter, in the exemplary embodiments of the present invention to bedescribed later, the left neighbor unit is referred to unit A, the upperneighbor unit is referred to as unit B, the right upper corner unit isreferred to as unit C, and the left upper corner unit is referred to asunit D. In addition, the encoding/decoding target unit is referred to asunit E.

FIG. 4 is a flow chart schematically showing a method for encoding anintra prediction mode according to an exemplary embodiment of thepresent invention.

Referring to FIG. 4, the encoder may determine the intra prediction modeof the encoding target unit (S410).

In addition, the encoder may derive the information on the neighborprediction mode (S420). Here, the neighbor prediction mode may mean theintra prediction mode of the reconstructed neighbor unit. Hereinafter,the information on the neighbor prediction mode is referred to as theneighbor prediction mode information.

Each of the reconstructed neighbor units may have the intra predictionmode. In this case, the encoder may derive the neighbor prediction modeinformation on the unit having the intra prediction mode among thereconstructed neighbor units. The angular difference between theneighbor prediction modes and/or the mode number of the neighborprediction modes, or the like, may be in the neighbor prediction modeinformation.

As described above, each of the intra prediction mode may have theprediction direction corresponding thereto and each of the predictiondirection may have a predetermined angle value. Therefore, each of theneighbor prediction modes may have a predetermined angle value and theencoder may derive the angular difference between the neighborprediction modes. Hereinafter, the information on the angular differencebetween the neighbor prediction modes is the angular differenceinformation.

In addition, each of the intra prediction modes may have a mode numbercorresponding thereto and the encoder may derive and/or discriminate themode number of the neighbor prediction mode. The mode number allocatedto the intra prediction mode may be determined according to theoccurrence probability of the intra prediction mode. For example, theprediction mode having the high occurrence probability may be allocatedwith the low mode number. Therefore, the mode number of the neighborprediction mode derived by the encoder may also represent the modesequence of the neighbor prediction modes. Hereinafter, the informationon the mode number of the neighbor prediction modes is referred to asthe mode number information.

Referring again to FIG. 4, the encoder may use the derived neighborprediction mode information to encode the intra prediction mode for theencoding target unit (S430).

The encoder may derive the MPM candidates for the encoding target unitso as to encode the intra prediction mode for the encoding target unit.The MPM candidates may be derived by using the intra prediction modes ofthe reconstructed neighbor unit. In this case, the encoder may use atleast one of the prediction modes of units A, B, C, and D.

When the non-available units are present in the reconstructed neighborunits, the encoder may not use the non-available units for deriving theMPM candidates. In addition, among the reconstructed neighbor units, theencoded/decoded unit by the pulse code modulation (PCM) scheme and/orthe encoded/decoded unit by the inter prediction may not include theinformation related to the intra prediction mode. Therefore, theencoded/decoded unit by the PCM scheme and/or the inter prediction maynot be used to derive the MPM candidates. In addition, among thereconstructed neighbor units, the encoded/decoded unit may be present bya constrained intra prediction (CIP) scheme. In the encoded/decoded unitby the CIP scheme, the encoded unit may not be used as the interprediction and the intra prediction may also be performed by using onlythe DC mode among the intra prediction modes. In this case, the encodermay not use the encoded/decoded unit for deriving the MPM candidates inthe DC mode.

According to the exemplary embodiment of the method for deriving the MPMcandidates, the encoder may select the prediction mode (for example, Min(A, B)) to which the smallest table index is allocated among theprediction modes of the left neighbor unit A and the prediction modes ofthe upper neighbor unit B as the MPM candidates included in the MPMlist. In this case, when the angular difference information indicatesthat the prediction mode angle of the unit A is the same as theprediction mode angle of the unit B, that is, when the mode number ofthe unit A is the same as the mode number of the unit B, the encoder mayselect the prediction modes regardless of the table index.

The table index may be allocated to the prediction mode based on theoccurrence frequency and statistics of the prediction mode. For example,the smallest table index value may be allocated to the prediction modehaving the highest occurrence frequency and the highest table indexvalue may be allocated to the prediction modes having the lowestoccurrence frequency.

The table index may not be allocated so as to meet the occurrencefrequency of the prediction mode. That is, the table index may not bealigned according to the occurrence frequency. In this case, the encodermay select the prediction modes having the higher occurrence frequencyamong the prediction mode of the unit A and the prediction modes of theunit B as the MPM candidates included in the MPM list regardless of thetable index value.

The encoder may also use the predetermined fixed number of MPMcandidates so as to encode the intra prediction mode. Here, N may be apositive integer.

As the exemplary embodiment, the number of MPM candidates included inthe MPM list may be 2. For example, the encoder may select theprediction mode of the left neighbor unit A and the prediction mode ofthe upper neighbor unit B as the MPM candidates.

In this case, the number of MPM candidates derived from unit A and unitB may be below 2. For example, when the angular difference informationindicates that the prediction mode angle of the unit A is the same asthe prediction mode angle of the unit B, that is, when the mode numberof the unit A is the same as the mode number of the unit B, the numberof MPM candidates derived from the encoder may be 1. In this case, theremaining MPM candidates other than the MPM candidates derived from theunit A and the unit B may be set and/or derived as the predeterminedmode. That is, the encoder may select the predetermined mode asadditional MPM candidates. For example, the predetermined mode may befixed to the DC. In addition, the predetermined mode may be a planarmode when the prediction modes of the unit A and the unit B are not theplanar mode and may be the DC mode when the prediction modes of the unitA and the unit B are the planar mode.

In addition, when the non-available units are present among thereconstructed neighbor units, the number of MPM candidates derived fromthe encoder may be 1. In this case, the remaining MPM candidates otherthan the MPM candidates derived from the unit A and the unit B may beset and/or derived as the predetermined mode. That is, the encoder mayselect the predetermined mode as additional MPM candidates. Herein, thepredetermined mode may be, for example, the DC mode or the planar mode.

As another exemplary embodiment of the present invention, the number ofMPM candidates included in the MPM list may be 3. For example, theencoder may select the prediction mode having the highest occurrencefrequency among the prediction mode of the left neighbor unit A, theprediction modes of the upper neighbor unit B, and the prediction modesof the previously encoded units as the MPM candidates.

In this case, the number of MPM candidates derived from unit A and unitB may be below 2. For example, when the angular difference informationindicates that the prediction mode angle of unit A is the same as theprediction mode angle of unit B, that is, when the mode number of unit Ais the same as the mode number of unit B, the number of MPM candidatesderived from the encoder may be 1. In addition, there may be thenon-available units among the reconstructed neighbor units. When thenumber of MPM candidates derived from the unit A and the unit B is below2, the encoder may also select the plurality of prediction modes inorder of the occurrence frequency among the prediction modes of thepreviously encoded unit as the MPM candidates.

The prediction mode select unit having the high occurrence frequency,that is the prediction mode select unit may be an encoding targetpicture, an encoding target slice, a largest coding unit (LCU), a codingunit (CU), and/or a prediction unit (PU) that include the encodingtarget unit. The encoder may also use a counter so as to calculate theoccurrence frequency of the prediction modes. When the counter is used,the encoder may perform the encoding on the prediction mode select unitand then, initialize the counter. That is, the counter may beinitialized as the prediction mode select unit.

When the MPM candidates are derived by the above-mentioned method, theencoder may generate the MPM list by using the derived MPM candidates.The encoder may determine whether the same MPM candidates as theprediction modes of the encoding target unit may be present within theMPM list. In this case, the encoder may transmit to the decoder the flagindicating whether the same MPM candidates as the prediction modes ofthe encoding target unit may be present within the MPM list.Hereinafter, the flag is referred to as the MPM flag.

According to the exemplary embodiment of the present invention, the MPMflag transmitted to the decoder may be represented byprev_intra_luma_pred_flag. For example, when the same MPM candidates asthe prediction modes of the encoding target unit are present within theMPM list, the MPM flag may be allocated with 1 and otherwise, 0.

When the same MPM candidates as the prediction modes of the encodingtarget unit are present in the MPM list, the encoder may transmit to thedecoder the index indicating whether the prediction modes of theencoding target unit is the same as any of the MPM candidates within theMPM list. Hereinafter, the index is referred to as the MPM index. Inthis case, the encoder and the decoder may be used the MPM candidatesindicating the MPM index as the intra prediction mode of the encodingtarget unit.

When the number of MPM candidates included in the MPM list is 1, theencoder may not encode the MPM index. In addition, even when the decodercan know the same MPM candidates as the prediction mode of the decodingtarget unit, the encoder may not encode the MPM index. In this case, theencoder may encode only the MPM flag and transmit the encoded MPM flagto the decoder.

When the same MPM candidates as the prediction modes of the encodingtarget unit are not present within the MPM list, the encoder may derivea remaining mode by using the prediction modes and the MPM list of thecurrent encoding target unit. Here, the remaining mode may derived byusing the intra prediction mode other than the MPM candidates. Theencoder may encode the generated remaining mode and transmit the encodedremaining mode to the decoder. According to the exemplary embodiment ofthe present invention, the remaining mode may be represented byrem_intra_luma_pred_mode.

The encoder may not use the reconstructed neighbor unit and/or the MPMcandidates up encoding the intra prediction mode of the encoding targetunit. In this case, the encoder may perform the entropy encoding on theintra prediction mode of the encoding target unit and may transmit theencoded intra prediction mode to the decoder.

Meanwhile, the encoder may perform the entropy encoding on theabove-mentioned MPM flag, MPM index, remaining mode, and/or intraprediction mode and transmit them to the decoder In this case, uponperforming the entropy encoding on each of the syntax elements, theencoder may perform the arithmetic encoding by using only the contextmodel and may also use the fixed bit encoding. In this case, however,the intra prediction mode information on the reconstructed neighbor unitis not used and therefore, the encoding efficiency may be low.Therefore, a method for performing the entropy encoding by using theinformation on the intra prediction mode of the reconstructed neighborunit, that is, the neighbor prediction mode information may be provided.As described above, the angular difference between the neighborprediction modes and/or the mode number of the neighbor prediction mode,or the like, may be in the neighbor prediction mode information.Hereinafter, the exemplary embodiments of the method for performing theentropy encoding on the encoding target unit by using the neighborprediction mode information will be described.

FIG. 5 is a flow chart showing an exemplary embodiment of a method forperforming entropy encoding using neighbor prediction mode information.

Referring to FIG. 5, the encoder may select the context model and/or theVLC table for the encoding target unit by using the neighbor modeinformation (S510). Herein, a variable length coding (VLC) table mayhave the same meaning as the variable length coding table.

The encoder may select and use one of the plurality of context models,upon performing the entropy encoding. In this case, the encoder mayselect the context model by using the angular difference informationbetween the neighbor prediction modes and may select the context modelby using the mode number and/or the mode sequence of the neighborprediction modes. In addition, the encoder may also select the contextmodel by using the angular difference information and the mode numberinformation.

In addition, the encoder may select and use one of the plurality of VLCtables, upon performing the entropy encoding. In this case, the encodermay select the VLC table by using the angular difference informationbetween the neighbor prediction modes and may select the context modelby using the mode number and/or the mode sequence of the neighborprediction modes. In addition, the encoder may also select the contextmodel by using the angular difference information and the mode numberinformation.

The encoder may perform the entropy encoding on the intra predictionmode of the encoding target unit by using the selected context modeland/or VLC table (S520). In this case, as described above, the syntaxelement performing the entropy encoding may include the MPM flag, theMPM index, the remaining mode, and/or the intra mode, or the like, asdescribed above.

FIG. 6 is a table showing an exemplary embodiment of a method forselecting a context model according to angular difference information.

Reference numeral 610 of FIG. 6 is a table indicating an example of theangular difference information between neighbor prediction modes.Reference numeral 610 of FIG. 6, VER may represent vertical directionprediction, HOR may represent horizontal direction prediction, and DCmay represent DC prediction.

As described above, each of the intra prediction mode may have theprediction direction corresponding thereto and each prediction directionmay have a predetermined angle value. Therefore, the predictiondirection difference between the neighbor prediction modes may bedefined by the angular difference between the neighbor prediction modes.The encoder and the decoder may likewise store the table including theangular difference information and the encoder and the decoder mayderive the angular difference between the neighbor prediction modes byusing the stored table.

Reference numeral 620 of FIG. 6 is a table indicating an example of acontext category of the angular difference between the neighborprediction modes. At reference numeral 620 of FIG. 6, d represents theangular difference value, ct □ N (N is 1, 2, 3, or 4) may represent thecontext model applied to the syntax element of the encoding target unit.In addition, Th1 (Threshold1), Th2 (Threshold2), Th3 (Threshold3), Th4(Threshold4) may each represent the threshold value of the angulardifference.

Referring to reference numeral 620 of FIG. 6, the encoder may select oneof four different context models by using the angular differenceinformation. For example, when the angular difference between theneighbor prediction modes is larger than Th1 and is smaller than Th2,the encoder may select ct □ 2 as the context model for the encodingtarget unit.

Reference numeral 630 of FIG. 6 is a table indicating another example ofa context category according to the angular difference between theneighbor prediction modes. Referring to reference numeral 630 of FIG. 6,the encoder may select one of four different context models by using theangular difference information.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 1 (HOR) and the intra prediction mode of the upperneighbor unit B is 33 (HOR+7). Here, 1 (HOR) may represent theprediction mode of which the mode number 1 and 33 (HOR+7) may representthe prediction mode of which the mode number is 33. In this case,referring to reference numeral 610 of FIG. 6, the angular differencebetween the neighbor prediction modes may be 35. Therefore, the encodermay select the ct □ 1 as the context model for the encoding target unit.

Although the above-mentioned exemplary embodiment describes the case inwhich the angular difference information is derived by using the leftneighbor unit A and the upper neighbor unit B, the method for derivingthe angular difference information is not limited to the exemplaryembodiment. The angular difference information between the neighborprediction modes may be derived by various methods using the availableunits among the reconstructed neighbor units.

In addition, in the above-mentioned exemplary embodiment, each contextmodel ct □ 1 to ct □ 4 may have different initial values. In this case,a most probable state (MPS) and a probability value of the most probablestate (MPS) may be determined by using different initial values in eachcontext model and the coding parameter of the quantization parameter, orthe like, may be used for determining the MPS and the MPS probabilityvalue.

FIG. 7 is a table showing an exemplary embodiment of a method forselecting a VLC table according to the angular difference information.

Reference numeral 710 of FIG. 7 is a table indicating an example of theangular difference information. As described above, each of the intraprediction mode may have the prediction direction corresponding theretoand each prediction direction may have a predetermined angle value.Therefore, the prediction direction difference between the neighborprediction modes may be defined by the angular difference between theneighbor prediction modes. The encoder and the decoder may store thetable including the angular difference information and the encoder andthe decoder may derive the angular difference between the neighborprediction modes by using the stored table.

Reference numeral 720 of FIG. 7 is a table indicating an example of aVLC table category according to the angular difference between theneighbor prediction modes. At reference numeral 720 of FIG. 7, drepresents the angular difference value, VLCN (N is 1, 2, 3, or 4) mayrepresent the VLC table applied to the syntax element of the encodingtarget unit. In addition, Th1 (Threshold1), Th2 (Threshold2), Th3(Threshold3), Th4 (Threshold4) may each represent the threshold value ofthe angular difference.

Referring to reference numeral 720 of FIG. 7, the encoder may select oneof four different VLC tables by using the angular differenceinformation. For example, when the angular difference between theneighbor prediction modes is larger than Th1 and is smaller than Th2,the encoder may select VLC2 as the VLC table for the encoding targetunit.

Reference numeral 730 of FIG. 7 is a table indicating another example ofa VLC table category according to the angular difference between theneighbor prediction modes. Referring to reference numeral 730 of FIG. 7,the encoder may select one of four different VLC tables by using theangular difference information. In reference numeral 730 of FIG. 7, whenthe angular difference value is 45 or less, VLC1 may be selected as theVLC table for the encoding target unit, when the angular differencevalue is larger than 45 and smaller than 90, VLC2 may be selected as theVLC table for the encoding target unit, when the angular differencevalue is larger than 90 and smaller than 135, VLC3 may be selected asthe VLC table for the encoding target unit, and when the angulardifference value is larger than 135, VLC4 may be selected as the VLCtable for the encoding target unit.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 1 (HOR) and the intra prediction mode of the upperneighbor unit B is 33 (HOR+7). Here, 1 (HOR) may represent theprediction mode of which the mode number 1 and 33 (HOR+7) may representthe prediction mode of which the mode number is 33. In this case,referring to reference numeral 710 of FIG. 7, the angular differencebetween the neighbor prediction modes may be 35. Therefore, the encodermay select the VLC1 as the VLC table for the encoding target unit.

Reference numeral 740 of FIG. 7 is a table indicating another example ofthe VLC table category according to the angular difference between theneighbor prediction modes Referring to reference numeral 740 of FIG. 7,the encoder may select one of two different VLC tables by using theangular difference information. At reference numeral 740 of FIG. 7, whenthe angular difference value is 0, that is, when the neighbor predictionmodes are the same (d=0), VLC1 may be selected as the VLC table for theencoding target unit. In addition, when the angular difference value isnot 0, that is, when the neighbor prediction modes are not the same(d!=0), the VLC2 may be selected as the VLC for the encoding targettable.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 1 (HOR) and the intra prediction mode of the upperneighbor unit B is 1 (HOR). Herein, 1 (HOR) may represent the predictionmode of which the mode number is 1. In this case, the intra predictionmode of the left neighbor unit A and the intra prediction mode of theupper neighbor unit B are the same and therefore, the angular differencebetween the neighbor prediction modes may be 0. Therefore, the encodermay select the VLC1 as the VLC table for the encoding target unit.

As another example, it is assumed that the intra prediction mode of theleft neighbor unit A is 1 (HOR) and the intra prediction mode of theupper neighbor unit B is 33 (HOR+7). Here, 1 (HOR) may represent theprediction mode of which the mode number is 1 and 33 (HOR+7) mayrepresent the prediction mode of which the mode number is 33. In thiscase, the intra prediction mode of the left neighbor unit A and theintra prediction mode of the upper neighbor unit B are not the same andtherefore, the angular difference between the neighbor prediction modesmay not be 0. Therefore, the encoder may select the VLC2 as the VLCtable for the encoding target unit.

Although the above-mentioned exemplary embodiment describes the case inwhich the angular difference information is derived by using the leftneighbor unit A and the upper neighbor unit B, the method for derivingthe angular difference information is not limited to the exemplaryembodiment. The angular difference information between the neighborprediction modes may be derived by various methods using the availableunits among the reconstructed neighbor units.

FIG. 8 is a table showing an exemplary embodiment of codewords allocatedto each of the plurality of VLC tables.

Referring to FIG. 8, in each VLC table, the allocated codewords may bedifferent according to each symbol value and/or each syntax element ineach VLC table. In this case, the encoder may improve the encodingefficiency by allocating the codewords having the short length to thesymbol having the high occurrence probability.

The encoder may update each of the VLC tables during the encodingprocess. For example, the VLC1 of FIG. 8, when the occurrence frequencyof symbol value 2 is higher than the occurrence frequency of symbolvalue 1, the encoder may change codeword ‘01’ allocated to symbol value1 and codeword ‘001’ allocated to symbol value 2. After the update isperformed, the encoder may perform the entropy encoding by using theupdated VLC table.

FIG. 9 is a table showing an exemplary embodiment of a method forselecting a context model according to a mode number of a neighborprediction mode.

Reference numeral 910 of FIG. 9 is a table representing an example ofthe mode number allocated to the neighbor prediction mode. Referencenumeral 910 of FIG. 9 shows the embodiment of the case in which thenumber of intra prediction modes included in the reconstructed neighborunits is 34.

As described above, the mode number allocated to the intra predictionmode may be determined according to the occurrence probability of theintra prediction mode. In this case, the prediction mode having the highoccurrence probability may be allocated with the low mode number. Forexample, in the table of reference numeral 910 of FIG. 9, the occurrenceprobability of the VER prediction mode may be highest. Therefore, themode number of the neighbor prediction modes may also represent the modesequence of the neighbor prediction modes.

Reference numeral 920 of FIG. 9 shows a table indicating an example of acontext category according to the mode number of the neighbor predictionmodes. At reference numeral 920 of FIG. 9, ct □ N (N is 1, 2, 3, or 4)may represent the context model applied to the syntax element of theencoding target unit. Referring to reference numeral 920 of FIG. 9, theencoder may select one of four different context models by using themode number of the neighbor prediction mode.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 0 (VER) and the intra prediction mode of the upperneighbor unit B is 6 (VER+6). Here, 0 (VER) may represent the predictionmode of which the mode number 0 and 6 (VER+6) may represent theprediction mode of which the mode number is 6. In this case, referringto 920 of FIG. 9, the mode number of the unit A and the mode number ofthe unit B may be included in the same context category. Since thecontext model corresponding to the context category is ct □ 1, the ct □1 may be selected as the context model for the encoding target unit.

As another example, it is assumed that the intra prediction mode of theleft neighbor unit A is 8 (HOR+4) and the intra prediction mode of theupper neighbor unit B is 21 (VER −1). Here, 8 (HOR+4) may represent theprediction mode of which the mode number is 8 and 21 (VER −1) mayrepresent the prediction mode of which the mode number is 21. Referringto 920 of FIG. 9, the mode number of the unit A and the mode number ofthe unit B may be included in different context category. In this case,the encoder may select the context model corresponding to smaller modenumber (for example, mode number 8). Since the context modelcorresponding to the mode number 8 is ct □ 2, the ct □ 2 may be selectedas the context model for the encoding target unit.

Although the above-mentioned exemplary embodiment describes the case inwhich the context model is selected by using the left neighbor unit Aand the upper neighbor unit B, the method for selecting a context modelis not limited to the exemplary embodiment. The mode number informationused to select the context mode may be derived by various methods usingthe available units among the reconstructed neighbor units.

FIG. 10 is a table showing an exemplary embodiment of a method forselecting a VLC table according to the mode number of the neighborprediction mode.

Reference numeral 1010 of FIG. 10 is a table representing an example ofthe mode number allocated to the neighbor prediction mode. Referencenumeral 1010 of FIG. 10 shows the embodiment of the case in which thenumber of intra prediction modes included in the reconstructed neighborunits is 34.

As described above, the mode number allocated to the intra predictionmode may be determined according to the occurrence probability of theintra prediction mode. In this case, the prediction mode having the highoccurrence probability may be allocated with the low mode number. Forexample, in the table of reference numeral 1010 of FIG. 10, theoccurrence probability of the VER prediction mode may be highest.Therefore, the mode number of the neighbor prediction modes may alsorepresent the mode sequence of the neighbor prediction modes.

Reference numeral 1020 of FIG. 10 shows a table indicating an example ofa VLC table category according to the mode number of the neighborprediction modes. At reference numeral 1020 of FIG. 10, the VLCN (N is1, 2, 3, or 4) may represent the VLC table applied to the syntax elementof the encoding target unit. Referring to reference numeral 1020 of FIG.10, the encoder may select one of four different VLC tables by using themode number of the neighbor prediction mode.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 0 (VER) and the intra prediction mode of the upperneighbor unit B is 6 (VER+6). Here, 0 (VER) may represent the predictionmode of which the mode number 0 and 6 (VER+6) may represent theprediction mode of which the mode number is 6. In this case, referringto 1020 of FIG. 10, the mode number of the unit A and the mode number ofthe unit B may be included in the same context category. The VLC tablecorresponding to the category is VLC1 and therefore, the encoder mayselect the VLC1 as the VLC table for the encoding target unit.

As another example, it is assumed that the intra prediction mode of theleft neighbor unit A is 8 (HOR+4) and the intra prediction mode of theupper neighbor unit B is 21 (VER −1). Here, 8 (HOR+4) may represent theprediction mode of which the mode number is 8 and 21 (VER −1) mayrepresent the prediction mode of which the mode number is 21. Referringto 1020 of FIG. 10, the mode number of the unit A and the mode number ofthe unit B may be included in different context category. In this case,the encoder may select the VLC table corresponding to smaller modenumber (for example, mode number 8). The VLC table corresponding to themode number 8 is VLC2 and therefore, the encoder may select the VLC2 asthe VLC table for the encoding target unit.

Although the above-mentioned exemplary embodiment describes the case inwhich the context model is selected by using the left neighbor unit Aand the upper neighbor unit B, the method for selecting a context modelis not limited to the exemplary embodiment. The mode number informationused to select the context mode may be derived by various methods usingthe available units among the reconstructed neighbor units.

FIG. 11 is a table showing the exemplary embodiment of the method forselecting a context model using the angular difference informationbetween the neighbor prediction modes and the mode number information onthe neighbor prediction modes.

In FIG. 11, ct □ N (N is 1, 2, 3, or 4) may represent the context modelapplied to the syntax element of the encoding target unit. Referring toFIG. 11, the encoder may select one of four different context models byusing the angular difference between the neighbor prediction modes andthe mode number of the neighbor prediction mode.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 1 (HOR) and the intra prediction mode of the upperneighbor unit B is 33 (HOR+7). Here, 1 (HOR) may represent theprediction mode of which the mode number 1 and 33 (HOR+7) may representthe prediction mode of which the mode number is 33. In this case, theangular difference between the neighbor prediction modes may be 35. Inaddition, since the mode number of the unit A and the mode number of theunit B are included in different categories, the encoder may select thecontext model corresponding to the smaller mode number (for example,mode number 1). Therefore, the encoder may select the ct □ 1 as thecontext model for the encoding target unit.

FIG. 12 is a table showing an exemplary embodiment of a method forselecting a VLC table using the angular difference information betweenthe neighbor prediction modes and the mode number information on theneighbor prediction modes.

In FIG. 12, the VLCN (N is 1, 2, 3, or 4) may represent the VLC tableapplied to the syntax element of the encoding target unit. Referring toFIG. 12, the encoder may select one of four different VLC tables byusing the angular difference between the neighbor prediction modes andthe mode number of the neighbor prediction mode.

For example, it is assumed that the intra prediction mode of the leftneighbor unit A is 0 (VER) and the intra prediction mode of the upperneighbor unit B is 0 (VER+6). Herein, 0 (HOR) may represent theprediction mode of which the mode number is 0. In this case, the angulardifference between the neighbor prediction modes may be 0. In addition,since the mode number of the unit A and the mode number of the unit B isincluded in the same category and therefore, the encoder may select theVLC table corresponding to the same category. Therefore, the encoder mayselect the VLC1 as the VLC table for the encoding target unit.

As another example, it is assumed that the intra prediction mode of theleft neighbor unit A is 1 (HOR) and the intra prediction mode of theupper neighbor unit B is 33 (HOR+7). Here, 1 (HOR) may represent theprediction mode of which the mode number 1 and 33 (HOR+7) may representthe prediction mode of which the mode number is 33. In this case, theangular difference between the neighbor prediction modes may be 35rather than 0. In addition, since the mode number of the unit A and themode number of the unit B are included in different categories, theencoder may select the VLC table corresponding to the smaller modenumber (for example, mode number 1). Therefore, the encoder may selectthe VLC2 as the VLC table for the encoding target unit.

Meanwhile, as described above, the encoder may derive the neighborprediction mode information on the encoding target unit by using thereconstructed neighbor unit. Herein, the angular difference between theneighbor prediction modes and/or the mode number of the neighborprediction mode, or the like, may be in the neighbor prediction modeinformation.

The number of reconstructed neighbor units may be 2 or more. In thiscase, the encoder selects two units having coding parameters mostsimilar to the coding parameter of the encoding target prediction unitamong the reconstructed neighbor units, which may be used to derive theneighbor prediction mode information.

In addition, the number of intra prediction modes included in thedecoding target unit and the number of intra prediction mode included inthe reconstructed neighbor unit may be different from each other. Inthis case, the encoder may also use only the intra prediction modecommonly included in the encoding target unit and the reconstructedneighbor unit, upon deriving the neighbor prediction mode information.

In addition, the first syntax element related to the intra predictionmode and the predetermined second syntax element different from thefirst syntax element may be represented in the VLC table used for theentropy encoding. In this case, the VLC table may be referred to as theintegrated VLC table. In this case, the encoder may encode the firstsyntax element and the second syntax element by using the integrated VLCtable.

According to the method for encoding the above-mentioned intraprediction mode, the encoder can efficiently encode the intra predictionmode by using the information on the neighbor prediction mode.Therefore, the encoding can be efficiently performed according to thechange in peripheral conditions and the encoding efficiency can beimproved.

FIG. 13 is a flow chart schematically showing a method for decoding anintra prediction mode according to an exemplary embodiment of thepresent invention.

Referring to FIG. 13, the decoder may derive the information on theneighbor prediction mode (S1310). Herein, the angular difference betweenthe neighbor prediction modes and/or the mode number of the neighborprediction mode, or the like, may be in the neighbor prediction modeinformation. The decoder may derive the neighbor prediction modeinformation by using the same method as the encoder.

When the neighbor prediction mode information is derived, the decodercan decode the intra prediction mode for the decoding target unit byusing the derived neighbor prediction mode information (S1320).

The decoder may derive the MPM candidates for the decoding target unitso as to decode the intra prediction mode for the decoding target unit.The MPM candidate may be derived by using the intra prediction modes ofthe reconstructed neighbor unit. The decoder may also use the neighborprediction mode information (for example, the angular difference betweenthe neighbor prediction modes and/or the mode number of the neighborprediction mode), upon deriving the MPM candidates. The method forderiving the MPM candidates is the same as the method for deriving theMPM candidate in the encoder and therefore, the description thereof willbe omitted. When the MPM candidates are derived, the decoder maygenerate the MPM list by using the derived MPM candidates.

As described above, the encoder may encode the MPM flag and transmit theencoded MPM flag to the decoder. Here, the MPM flag is a flag indicatingwhether the same MPM candidates as the prediction mode of the encodingtarget unit are present in the MPM list. In this case, the decoder canreceive and decode the MPM flag. The decoder may determine whether thesame MPM candidates as the prediction mode of the decoding target unitare present in the MPM list by using the decoded MPM flag.

When the same MPM candidates as the prediction mode of the encodingtarget unit are present in the MPM list, the encoder may encode the MPMindex and transmit the encoded MPM index to the decoder. Here, the MPMindex is an index indicating whether the prediction mode of the encodingtarget unit is the same as any of the MPM candidates within the MPMlist. In this case, the decoder can receive and decode the MPM index.The decoder may use the MPM candidates indicated by the decoded MPMindex among the MPM candidates within the MPM list as the intraprediction mode of the decoding target unit.

When the number of MPM candidates included in the MPM list is 1, theencoder may not encode the MPM index. In addition, even when the decodercan know the same MPM candidates as the prediction mode of the decodingtarget unit, the encoder may not encode the MPM index. In this case, thedecoder can omit the process of receiving and decoding the MPM index.

When the same MPM candidates as the prediction mode of the encodingtarget unit are present in the MPM list, the encoder may encode theremaining mode and transmit the encoded remaining mode to the decoder.In this case, the decoder can receive and decode the remaining mode.

The encoder may not use the reconstructed neighbor unit and/or the MPMcandidates up encoding the intra prediction mode of the encoding targetunit. In this case, the encoder may perform the entropy encoding on theintra prediction mode of the encoding target unit and may transmit theencoded intra prediction mode to the decoder. In this case, the decodermay receive the encoded intra prediction mode and perform the entropydecoding thereon.

Meanwhile, the decoder may perform the entropy decoding on theabove-mentioned MPM flag, the MPM index, the remaining mode, and/or theintra prediction mode. In this case, upon performing the entropydecoding on each of the syntax elements, the decoder may perform thearithmetic decoding by using only one context model and may also use thefixed bit decoding. In this case, however, the intra prediction modeinformation of the reconstructed neighbor unit is not used andtherefore, the decoding efficiency may be low. Therefore, a method forperforming the entropy decoding by using the information on the intraprediction mode of the reconstructed neighbor unit, that is, theneighbor prediction mode information may be provided.

FIG. 14 is a flow chart showing an exemplary embodiment of a method forperforming entropy decoding using the neighbor prediction modeinformation.

Referring to FIG. 14, the decoder may select the context model and/orthe VLC table for the decoding target unit by using the neighbor modeinformation (S1410).

The decoder may select and use one of the plurality of context models,upon performing the entropy decoding. In this case, the decoder mayselect the context model by using the angular difference informationbetween the neighbor prediction modes and may select the context modelby using the mode number and/or the mode sequence of the neighborprediction modes. In addition, the decoder may also select the contextmodel by using the angular difference information and the mode numberinformation.

In addition, the decoder may select and use one of the plurality of VLCtables, upon performing the entropy decoding. In this case, the decodermay select the VLC table by using the angular difference informationbetween the neighbor prediction modes and may select the context modelby using the mode number and/or the mode sequence of the neighborprediction modes. In addition, the decoder may also select the contextmodel by using the angular difference information and the mode numberinformation.

The decoder may select the context model and/or the VLC table for thedecoding target unit by the same method as the encoder. The detailedexemplary embodiment of the method for selecting the context model andthe VLC table is described above and therefore, the description thereofwill be omitted.

The decoder may perform the entropy decoding on the intra predictionmode of the decoding target unit by using the selected context modeland/or the VLC table (S1420). In this case, as described above, thesyntax element performing the entropy decoding may include the MPM flag,the MPM index, the remaining mode, and/or the intra mode, or the like,as described above.

According to the method for decoding the above-mentioned intraprediction mode, the decoder can efficiently decode the intra predictionmode by using the information on the neighbor prediction mode.Therefore, the decoding can be efficiently performed according to thechange in peripheral conditions and the decoding efficiency can beimproved.

In the above-mentioned exemplary system, although the methods havedescribed based on a flow chart as a series of steps or blocks, thepresent invention is not limited to a sequence of steps but any step maybe generated in a different sequence or simultaneously from or withother steps as described above. Further, it may be appreciated by thoseskilled in the art that steps shown in a flow chart is non-exclusive andtherefore, include other steps or deletes one or more steps of a flowchart without having an effect on the scope of the present invention.

The above-mentioned embodiments include examples of various aspects.Although all possible combinations showing various aspects are notdescribed, it may be appreciated by those skilled in the art that othercombinations may be made. Therefore, the present invention should beconstrued as including all other substitutions, alterations andmodifications belong to the following claims.

What is claimed is:
 1. A video encoding apparatus comprising: aprediction module to perform intra prediction on the target encodingunit based on an intra prediction mode of a target encoding unit; deriveneighbor prediction mode information from a left neighbor predictionmode and an upper neighbor prediction mode; determine most probable mode(MPM) candidates for the target encoding unit using the neighborprediction mode information; generate an MPM list using the determinedMPM candidates; and derive an MPM index using the intra prediction modeof the target encoding unit and the generated MPM list; a subtractor togenerate a residual block by subtracting a prediction block generated bythe intra prediction from the target encoding unit; a transformationmodule to perform transformation on coefficients related to the residualblock to derive transform coefficients; a quantization module to performquantization on the transform coefficients to derive quantized transformcoefficients; and an encoding module to perform encoding on thequantized transform coefficients, along with an MPM flag and the MPMindex for the target encoding unit; wherein the left neighbor predictionmode is an intra prediction mode of a left neighbor unit adjacent to aleft side of the target encoding unit and the upper neighbor predictionmode is an intra prediction mode of an upper neighbor unit adjacent toan upper side of the target encoding unit, and the MPM index is an indexindicating the same candidate as the intra prediction mode of the targetencoding unit, among the MPM candidates included in the MPM list,wherein the neighbor prediction mode information includes a mode numberof the left neighbor prediction mode and a mode number of the upperneighbor prediction mode, wherein the prediction module determines theleft neighbor prediction mode and the upper neighbor prediction mode asthe MPM candidates, wherein the prediction module determines apredetermined intra prediction mode as an additional MPM candidate whenthe left neighbor prediction mode is the same as the upper neighborprediction mode; and wherein, in case the same candidate as the intraprediction mode of the target encoding unit is not present in the MPMlist, remaining mode information derived from the intra prediction modeof the target encoding unit is encoded.
 2. The video encoding apparatusof claim 1, wherein the predetermined intra prediction mode is a DC modeor planar mode.
 3. The video encoding apparatus of claim 2, wherein thepredetermined intra prediction mode is a DC mode when the left neighborprediction mode and the upper neighbor prediction mode are a planarmode, and the predetermined intra prediction mode is a planar mode whenthe left neighbor prediction mode and the upper neighbor prediction modeare a DC mode.
 4. A non-transitory computer-readable medium storing abitstream that is received and used by a video decoding apparatus toreconstruct a video, the bitstream comprises information on quantizationtransform coefficients related to a target decoding unit, a mostprobable mode (MPM) flag and an MPM index for a target decoding unit,wherein the quantization transform coefficients are used to derivetransform coefficients, the transform coefficients areinverse-transformed to generate a residual block, the MPM flag and theMPM index are used to derive an intra prediction mode of the targetdecoding unit, wherein an MPM list is generated using MPM candidates forthe target decoding unit, the MPM candidates are determined usingneighbor prediction mode information which is derived from a leftneighbor prediction mode and an upper neighbor prediction mode, thederived intra prediction mode is used to perform intra prediction on thetarget decoding unit to generate a prediction block, the predictionblock is added to the residual block to generate a reconstructed block,wherein the left neighbor prediction mode is an intra prediction mode ofa left neighbor unit adjacent to a left side of the target decoding unitand the upper neighbor prediction mode is an intra prediction mode of anupper neighbor unit adjacent to an upper side of the target decodingunit, and the MPM index is an index indicating the same candidate as theintra prediction mode of the target decoding unit, among the MPMcandidates included in the MPM list, wherein the neighbor predictionmode information includes a mode number of the left neighbor predictionmode and a mode number of the upper neighbor prediction mode, whereinthe prediction module determines the left neighbor prediction mode andthe upper neighbor prediction mode as the MPM candidates, wherein theprediction module determines a predetermined intra prediction mode as anadditional MPM candidate when the left neighbor prediction mode is thesame as the upper neighbor prediction mode; and wherein, in case thesame candidate as the intra prediction mode of the target decoding unitis not present in the MPM list, the bitstream further comprisesremaining mode information which is used to derive the intra predictionmode of the target decoding unit.